<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!--头部固定引用-->
    <meta charset="utf-8">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/icon-font.css"/><!--图标-->
    <!--固定引用结束,自定义引用添加在下面-->
    <title>反馈进度</title>
    <!--页面样式添加在这里，多看看base。css里面的公共样式，大部分常用的都有，避免使用独立css文件为单独页面设置样式，避免随意添加样式到公共样式-->
    <style>
        .index-data-business img {
            width: 100%;
            height: inherit;
        }

        .feedback-detail-top {
            padding: 0.32rem;
            border-bottom: 1px solid rgba(242, 242, 242, 1);
        }

        .feedback-detail-bar {
        }

        .feedback-detail-icontop {
            color: rgba(44, 104, 255, 1);
            margin-right: 0.18rem;
        }

        .feedback-question-answer {
            padding: 0.34rem 0.3rem 0.28rem 0.34rem;
        }

        .feedback-detail-submit {
            margin-left: 0.2rem;
        }

        .feedback-detail-leftbar {
            color: rgba(44, 104, 255, 1);
        }

        .feedback-detail-date {
            font-size: 0.24rem;
            color: rgba(34, 34, 34, 0.5);
        }

        .feedback-detail-question {
            border-left: 1px solid rgba(44, 104, 255, 1);
            margin-left: 0.16rem;
        }

        .feedback-detail-answer {
            margin-left: 0.16rem;
        }

        .feedback-detail-context {
            font-size: 0.28rem;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: rgba(34, 34, 34, 0.7);
            line-height: 0.42rem;
            padding: 0.28rem 0.32rem 0.32rem 0.36rem;
            margin-bottom: 1.32rem;
        }

        .feedback-detail-answering {
            color: rgba(34, 34, 34, 0.45);
        }
    </style>
</head>
<!--尽量不要在body上添加样式，除了背景色-->
<body>
<div class="w-100-p h-100-p flex-column bg-white">

    <!-- 导航栏&标题栏 -->
    <div class="placeholder-top">
        <!--状态栏-->
        <div class="bg-main status-bar pos-f"></div>
        <!--导航栏-->
        <div class="bg-main nav-bar pos-f flex-row justify-content-between c-white align-items-center">
            <div class="left-bar" onclick="clickBack()">
                <span class="iconfont iconfanhui1 fs16"></span>
            </div>
            <div class="center-bar fs16 ff500 line1">反馈消息</div>
            <div class="right-bar">
            </div>
        </div>
    </div>

    <!--反馈进度图标以及反馈进度字-->
    <div class="feedback-detail-top flex-row">
        <div class="feedback-detail-icontop">
            <span class="iconfont iconshijian fspx18"></span>
        </div>
        <div class="ff400">
            反馈进度
        </div>
    </div>

    <!--问题与答案 -->
    <div class="pos-r flex-1 scoll-y flex-column feedback-question-answer">

    </div>


</div>
</body>
<!--下面四个文件为固定引用，自己根据情况调整路径，不要跟换引入顺序，其他引用添加在后面-->
<script src="../../js/dict.js"></script>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/checkJsBridge.js"></script>
<script src="../../js/utils.js"></script>
<script src="../../js/date.js"></script>
<script src="../../js/api.js"></script>
<!--固定引用结束-->
<!--避免一个页面包含过多功能，减少js重绘页面，推荐分功能，分页面-->
<script>

   //获取问答详情信息
function getFeedbackDetail(messageId,status) {
  let htmlStr = ''
  Server.feedback.getFeedbackDetial({
       messageId: messageId,
       status:status
  }).then(function (data) {
       htmlStr = `<!--上方图标,已提交,时间-->
                            <div class="flex-row justify-content-between feedback-detail-bar ">
                            <div class="flex-row align-items-center align-items-end">
                                <!--图标-->
                            <span class="iconfont icontijiao-01 fs16 feedback-detail-leftbar">
                            </span>
                                <!--图标-->
                            <div class="ff400 feedback-detail-submit">
                            已提交
                            </div>
                            </div>
                                <!--时间-->
                            <div class="feedback-detail-date ff400">
                                ${DateUtils.int2Str(data.feedbackDetail.createdTime * 1000, 'yyyy-MM-dd hh:mm')}
                            </div>
                            </div>

                                <!-- 问题 -->
                            <div class="feedback-detail-question">
                            <div>
                            <div class="feedback-detail-context">
                                ${data.feedbackDetail.msgConnect}
                            </div>
                        </div>
                        </div>
                        `


       if (data.feedbackDetail.status === '1'){
         htmlStr +=
                            `<!--上方图标,已提交,时间-->
                            <div class="flex-row justify-content-between feedback-detail-answering feedback-detail-bar">
                            <div class="flex-row">
                                <!--图标-->
                            <div class="iconfont icontijiao-01 fs16 feedback-detail-leftbar feedback-detail-answering">
                            </div>
                                <!--答复状态-->
                            <div class="ff400 feedback-detail-submit">
                            答复中
                            </div>
                            </div>
                            </div>`
       }
       else
       {
         htmlStr += `<!--上方图标,已提交,时间-->
                                    <div class="flex-row justify-content-between">
                                    <div class="flex-row">
                                        <!--图标-->
                                    <div class="iconfont icontijiao-01 fs16 feedback-detail-leftbar">
                                    </div>
                                        <!--答复状态-->
                                    <div class="ff400 feedback-detail-submit">
                                    已答复
                                    </div>
                                    </div>
                                        <!--时间-->
                                    <div class="feedback-detail-date ff400">
                                        ${DateUtils.int2Str(data.feedbackDetail.answerDttm * 1000, 'yyyy-MM-dd hh:mm')}
                                    </div>
                                    </div>

                                        <!-- 问题 -->
                                    <div class="feedback-detail-answer">
                                    <div>
                                    <div class="feedback-detail-context">
                                        ${data.feedbackDetail.answer}
                                    </div>
                                    </div>
                                    </div>
                                    `

       }
       $('.feedback-question-answer').html(htmlStr)
       if (data.feedbackDetail.status === '1'){
         //问题边框置灰

       }
  })
}

   /*固定页面初始化方法，用于替代$(function(){}),param为url参数，Object类型*/
   function initPage(params) {
     //状态栏自适应
     Utils.sbhAdaptive()
     //获取问答详情
     getFeedbackDetail(params.messageId,params.status)

   }

/*页面所在窗口由后台前台时触发的方法,param为url参数，Object类型*/
function startPage(params) {

}
</script>
</html>
